/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.tspp.dao;

import com.tspp.dao.dto.Speciality;
import java.util.List;

/**
 * Interface for speciality dao. Contains crud operation
 * @author Maks
 */
public interface SpecialityDao {
    /**
     * Inserts a new row in the SPECIALITY table.
     */
    public void insert(Speciality dto) throws DaoException;

    /**
     * Updates a single row in the SPECIALITY table.
     */
    public void update(int speciality, Speciality dto) throws DaoException;

    /**
     * Deletes a single row in the SPECIALITY table.
     */
    public void delete(int speciality) throws DaoException;

    /**
     * Returns all rows from the SPECIALITY table that match the criteria 'ID_SPECIALITY = :idSpeciality'.
     */
    public Speciality findByPrimaryKey(int idSpeciality) throws DaoException;

    /**
     * Returns all rows from the SPECIALITY table that match the criteria ''.
     */
    public List<Speciality> findAll() throws DaoException;

    /**
     * Returns all rows from the SPECIALITY table that match the criteria 'NAME = :name'.
     */
    public List<Speciality> findWhereNameEquals(String name) throws DaoException;

    /**
     * Returns all rows from the SPECIALITY table that match the criteria 'CODE = :code'.
     */
    public List<Speciality> findWhereCodeEquals(String code) throws DaoException;

    /**
     * Returns all rows from the SPECIALITY table that match the criteria 'MAX_STUDENTS_NUMBER = :maxStudentsNumber'.
     */
    public List<Speciality> findWhereMaxStudentsNumberEquals(int maxStudentsNumber) throws DaoException;
}
